﻿using BCCommon.Extensions;
using BCCommon.OAEnums;
using BCCommon.OAEnums.WorkflowActive;
using BCDto.OA.WorkflowActive.WorkflowActivity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCDto.OA.WorkflowActive.WorkflowActive
{
    /// <summary>
    /// 工作流活动任务当前执行步骤视图
    /// </summary>
    public class WorkflowActivityViewDto:WorkflowActivityDto
    {
        /// <summary>
        /// 工作流活动步骤Id
        /// </summary>
        public long WorkflowActivityStepId { get; set; }
        /// <summary>
        /// 模板步骤Code
        /// </summary>		
        public string TemplateStepCode { get; set; }
        /// <summary>
        /// 步骤Code
        /// </summary>		
        public string StepCode { get; set; }
        /// <summary>
        /// 步骤名称
        /// </summary>		
        public string NodeName { get; set; }
        /// <summary>
        /// 步骤类型(开始、结束、节点、会签、条件、子流程）
        /// </summary>		
        public OAStepNodeType NodeType { get; set; }
        /// <summary>
        /// 任务步骤
        /// </summary>		
        public int Step { get; set; }
        /// <summary>
        /// 步骤类型(新创建，被驳回)
        /// </summary>		
        public OAActivityStepType StepType { get; set; }
        /// <summary>
        /// 步骤类型(新创建，被驳回)
        /// </summary>		
        public string StepTypeStr
        {
            get
            {
                return this.StepType.GetDescriptionString();
            }
        }
        /// <summary>
        /// 步骤状态(等待，激活，完成)
        /// </summary>		
        public OAActivityStepStatus StepStatus { get; set; }
        /// <summary>
        /// 步骤状态(等待，激活，完成)
        /// </summary>		
        public string StepStatusStr 
        { 
            get 
            {
                return this.StepStatus.GetDescriptionString();
            }
        }
        /// <summary>
        /// 步骤顺序(非步骤，仅记录所有记录序列号)
        /// </summary>		
        public int StepOrder { get; set; }
        /// <summary>
        /// 是否为加签步骤
        /// </summary>		
        public bool IsAdditionalValidationStep { get; set; }
        /// <summary>
        /// 加签步骤备注
        /// </summary>
        public string AdditionalRemark { get; set; }
        /// <summary>
        /// 允许指定下一节点审核人
        /// </summary>
        public bool AllowAssignNextValidater { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>		
        public new DateTime CreateTime { get; set; }
        /// <summary>
        /// 激活时间
        /// </summary>		
        public DateTime? ActiveTime { get; set; }
        /// <summary>
        /// 完成时间
        /// </summary>		
        public new DateTime? CompleteTime { get; set; }
        /// <summary>
        /// 完成类型(通过，拒绝)
        /// </summary>		
        public OAActivityStepCompleteType CompleteType { get; set; }
        /// <summary>
		/// 执行人Id
        /// </summary>		
        public long? ExecutorId { get; set; }
        /// <summary>
        /// 执行人姓名
        /// </summary>		
        public string ExecutorName { get; set; }
        /// <summary>
        /// 执行人类型
        /// </summary>		
        public OAAuthorRoleType? ExecutorType { get; set; }
        /// <summary>
        /// 驳回人Id
        /// </summary>		
        public long? RejectorId { get; set; }
        /// <summary>
        /// 驳回人姓名
        /// </summary>		
        public string RejectorName { get; set; }
        /// <summary>
        /// 驳回人类型
        /// </summary>		
        public OAAuthorRoleType? RejectorType { get; set; }
        /// <summary>
        /// 驳回备注
        /// </summary>		
        public string RejectedRemark { get; set; }
        /// <summary>
        /// 回复驳回备注
        /// </summary>		
        public string ReplyRemark { get; set; }
        /// <summary>
        /// 步骤耗时
        /// </summary>		
        public string TimeConsuming { get; set; }
        /// <summary>
        /// 步骤耗时秒数
        /// </summary>		
        public int? TimeConsumingSeconds { get; set; }
    }
}
